home *** CD-ROM | disk | FTP | other *** search
- Path: news.sprintlink.net!datalytics!usenet
- From: Rob Stewart <stew@datalytics.com>
- Newsgroups: comp.lang.c++
- Subject: Re: bitfield
- Date: Thu, 18 Apr 1996 10:22:54 -0400
- Organization: Datalytics, Inc
- Message-ID: <3176503E.42A0@datalytics.com>
- References: <3172B547.1F54@braunschweig.netsurf.de> <Pine.LNX.3.91.960417052937.630D-100000@mittens.stu.rpi.edu>
- NNTP-Posting-Host: 204.62.224.71
- Mime-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: quoted-printable
- X-Mailer: Mozilla 2.0 (WinNT; I)
-
- Kengo Hashimoto wrote:
- > =
-
- > On Mon, 15 Apr 1996, Dieter L=FCcking wrote:
- > =
-
- > > Problem:
- > >
- > > struct BITS
- > > {
- > > int bits : 3;
- > > };
- > >
- > > BITS array[8];
- > >
- > > How much memory needs array ?
- > >
- > > Danke Dieter
- > =
-
- > Simple. Do a sizeof(array) and it'll return the value. =3D]
- > =
-
-
- That's the right answer, since the layout of bitfields, and =
-
- structs in general, is implementation dependent.
-
- -- =
-
- Robert Stewart | My opinions are usually my own.
- Datalytics, Inc. | stew@datalytics.com
-